<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p5_元素显示模式</title>
    <style>
        div {
            width: 100px;
            height: 100px;
            border: 5px solid #f00;
            /* 块级元素:默认高度为0,宽度为父级宽度的100%,可以自设宽高,竖着排 */
            display: block;
        }
        span {
            width: 150px;
            height: 150px;
            background-color: #ff0;
            /* 行内元素:默认大小靠内容撑起来,无法自设宽高,横着排 */
            display: inline;
            display: block;
        }
        input,button {
            width: 200px;
            height: 200px;
            background-color: pink;
            /* 行内块元素:既像行内元素横着排,又像块级元素可以设置宽高 */
            display: inline-block;
        }
        .d2 {
            /* 元素消失:此种消失方式会脱离文档流,释放布局空间 */
            display: none;
        }
    </style>
</head>
<body>
    <div class="d1">111</div>
    <div class="d2">222</div>
    <div class="d3">333</div>
    <hr>
    <span>12345678900000000000000000</span>
    <span>123456789</span>
    <span>123456789</span>
    <hr>
    <input type="text">
    <input type="text">
    <button>按钮</button>
</body>
</html>